{include file='public/header'}
<style type="text/css">
  .kong1{height:35px;display:block;margin-top:60px;}
.simg1{position:relative;width:49%;margin-left:1%;height:105px;float:left;z-index:10;
margin-bottom:10px;}
.simg1 .img2{width:50px;height:50px;border-radius:4px;z-index:20;float: right;margin-right: 10px}
.simg1 p{font-size:1rem;color:#fff;text-align: right;font-weight: bold}
  .simg1 .p1{
      text-align: right;
  }
  .simg1 p img{
    width: 40px;
  }
    .simg1 .big{
        width: 90%;
        margin: 0 auto;
        background: rgba(255,255,255,0.2);
        border: 2px solid #8b848e;
        border-radius: 8px;
        padding: 15px 0px;
    }
  .simg1 .big .left{
      float: left;
      margin-left: 10px;
  }
  .footer1 .p1{
      margin-top:1px;font-weight: bold;
  }
</style>
<body style="">
<div class="bg_fixed_v10_2"></div>
<div class="sectionY sectionY_tttt" >
    <p class="p1" style="color: #fff">
        <span class="ppp_title">矿机</span>
    </p>
</div>
	<div class="kong1" style="margin-top: 25px"></div>
<style>
    .kuangg_section1_1{
        background: #122b6c;
    }
    .kuangg_section1_1 li{
        float: left;
        width: 33.1%;
        border-right: 1px solid #04c5f0;
        text-align: center;
        color: #fff;
        padding: 10px 0px;
    }
    .kuangg_section1_1 li:last-child{
        border-right: none;
    }
    .kuangg_section1_1 li.select{
        background: #0b7aad;
        border-color: #0b7aad;
    }
</style>
<div class="kuangg_section1">
    <div class="container">
        <div class="kuangg_section1_1 clearfix">
            <ul>

                <li class="select" onclick="javascript:location.href='{:url("Index/ourshop")}';" >
                    <span class="s1">矿机列表</span>
                </li>

                <li onclick="javascript:location.href='{:url("Index/myshop")}';" >
                    <span class="s1">我的矿机</span>
                </li>
                <li onclick="javascript:location.href='{:url("Index/endshop")}';" >
                    <span class="s1">过期矿机</span>
                </li>
            </ul>
        </div>
    </div>
</div>
<div class="kuangg_section2">
    <div class="container">
        <div class="kuangg_section2_1">
            {volist name="list" id="item"}
            <div class="list clearfix">
                <div class="a1">
                    <img src="__PUBLIC__/home/images/v10_a16.png" alt="">
                </div>
                <div class="a2">
                    <p class="p1">{$item.title}</p>
                    <p class="p2">矿机价格：{$item.price} SCB</p>
                    <p class="p2">运行周期：{$item.daynum}天</p>
                    <p class="p2">每日收益：{$item.dayearn} SCB</p>
                    <p class="p2">总收益：<?php echo ($item['daynum']*$item['dayearn']); ?> SCB</p>
                </div>
                <div class="a3">
                    <a href="javascript:void(0);" onclick="buyshop('{$item.id}')">兑换</a>
                </div>
            </div>
            {/volist}



        </div>
    </div>
</div>

  {include file="public/newfoot"}
</body>

<script>



/*开始抢购代码  xuanfeng 20190621*/
    function buyshop(id){
        if(id=='' || id==undefined){
            layer.alert('系统参数错误，请刷新后再试！',{shade:0.2});return false;
        }

        $.ajax({
            type: 'POST',
            url: "{:url('Shop/getshop')}",
            dataType: "json",
            data: "id="+id,
            success:function(responsestr){
                  var getcode = responsestr.result_code;
                  var getinfo = responsestr.result_info;
                  if(getcode==0){
                    layer.msg('兑换成功！',{icon:1,time:3000,shade:0.4},function() {
                        location.href = "{:url('Index/myshop')}";
                    });
                  }else{
                    layer.msg(getinfo,{icon:2,time:2000,shade:0.4},function() {
                        location.href = "{:url('Index/ourshop')}";
                    });
                  }
            },
            error:function(){
                r2('当前访客较多，请稍后再试！','1.png');
            }
        });
    }




	$(function(){
		var d = $(window).height()-46-44;
		$(".zu_section2").css("height",d);
		$(".show_btn").click(function(){
			$(".big_img").show(200);
		})
		$(".big_img").click(function(){
			$(".big_img").hide(200);
		})
	})

$(function(){
  $('.simg1').click(function(){
      var url = $(this).data('url');
      if(url){
        location.href = url;
      }else{
          layer.alert('等待开放',{title:'程序提示',shade:0.8});
      }
    return false;
  });
})



    $(".kuangg_section1_1 li").click(function(){
        $(this).addClass("select").siblings().removeClass("select")
    })
    $(".kuangg_section2").css("height",($(window).height()-190))
</script>


</html>
